# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.conf.urls import patterns, url
from wenlincms.conf import settings

_verify_pattern = "/(?P<uidb36>[-\w]+)/(?P<token>[-\w]+)"
_slash = "/" if settings.APPEND_SLASH else ""

urlpatterns = patterns("accounts.views",
                       url("^accounts/login/$", "login", name="login"),  # 登入
                       url("^accounts/logout/$", "logout", name="logout"),  # 登出
                       url("^accounts/signup/$", "signup", name="signup"),  # 注册

                       # 校验用户名是否已被注册
                       url("^accounts/judgeusername/$", "judge_username_exist", name="judge_username_exist"),
                       # 校验图片验证码
                       url("^accounts/randomCodeVerify/", "verify_random_code", name="verify_random_code"),

                       url("^accounts/profile/$", "account_redirect", name="account_profile_redirect"),
                       url("^accounts/$", "account_redirect", name="account_redirect"),

                       url("^change_pwd/$", "change_pwd", name="change_pwd"),
                       # 子帐号管理
                       url("^manage_user/$", "manage_user", name="manage_user"),
                       url("^create_user/$", "create_user", name="create_user"),
                       url("^change_user/$", "change_user", name="change_user"),
                       url("^delete_user/$", "delete_user", name="delete_user"),
                       )
